/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entities;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Cristian
 */
@Entity
@Table(name = "scsgtbusurol")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Scsgtbusurol.findAll", query = "SELECT s FROM Scsgtbusurol s"),
    @NamedQuery(name = "Scsgtbusurol.findByScsgtbusurolid", query = "SELECT s FROM Scsgtbusurol s WHERE s.scsgtbusurolid = :scsgtbusurolid"),
    @NamedQuery(name = "Scsgtbusurol.findByHabilitado", query = "SELECT s FROM Scsgtbusurol s WHERE s.habilitado = :habilitado"),
    @NamedQuery(name = "Scsgtbusurol.findByFechainicio", query = "SELECT s FROM Scsgtbusurol s WHERE s.fechainicio = :fechainicio"),
    @NamedQuery(name = "Scsgtbusurol.findByCaducidad", query = "SELECT s FROM Scsgtbusurol s WHERE s.caducidad = :caducidad"),
    @NamedQuery(name = "Scsgtbusurol.findByFechafin", query = "SELECT s FROM Scsgtbusurol s WHERE s.fechafin = :fechafin"),
    @NamedQuery(name = "Scsgtbusurol.findByHinvestig", query = "SELECT s FROM Scsgtbusurol s WHERE s.hinvestig = :hinvestig"),
    @NamedQuery(name = "Scsgtbusurol.findByHacademicas", query = "SELECT s FROM Scsgtbusurol s WHERE s.hacademicas = :hacademicas"),
    @NamedQuery(name = "Scsgtbusurol.findByFecharegistro", query = "SELECT s FROM Scsgtbusurol s WHERE s.fecharegistro = :fecharegistro"),
    @NamedQuery(name = "Scsgtbusurol.findByObservaciones", query = "SELECT s FROM Scsgtbusurol s WHERE s.observaciones = :observaciones")})
public class Scsgtbusurol implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "scsgtbusurolid")
    private Integer scsgtbusurolid;
    @Basic(optional = false)
    @NotNull
    @Column(name = "habilitado")
    private boolean habilitado;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 2147483647)
    @Column(name = "fechainicio")
    private String fechainicio;
    @Basic(optional = false)
    @NotNull
    @Column(name = "caducidad")
    private boolean caducidad;
    @Column(name = "fechafin")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fechafin;
    @Basic(optional = false)
    @NotNull
    @Column(name = "hinvestig")
    private int hinvestig;
    @Basic(optional = false)
    @NotNull
    @Column(name = "hacademicas")
    private int hacademicas;
    @Basic(optional = false)
    @NotNull
    @Column(name = "fecharegistro")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fecharegistro;
    @Size(max = 255)
    @Column(name = "observaciones")
    private String observaciones;
    @JoinColumn(name = "scthtbmodalidaid", referencedColumnName = "scthtbmodalidaid")
    @ManyToOne(optional = false)
    private Scthtbmodalida scthtbmodalidaid;
    @JoinColumn(name = "scthtbdatosgenid", referencedColumnName = "scthtbdatosgenid")
    @ManyToOne(optional = false)
    private Scthtbdatosgen scthtbdatosgenid;
    @JoinColumn(name = "scsgtbrolesid", referencedColumnName = "scsgtbrolesid")
    @ManyToOne(optional = false)
    private Scsgtbroles scsgtbrolesid;
    @JoinColumn(name = "scittbfadeceid", referencedColumnName = "scittbfadeceid")
    @ManyToOne
    private Scittbfadece scittbfadeceid;
    @JoinColumn(name = "scittbescunid", referencedColumnName = "scittbescunid")
    @ManyToOne
    private Scittbescun scittbescunid;

    public Scsgtbusurol() {
    }

    public Scsgtbusurol(Integer scsgtbusurolid) {
        this.scsgtbusurolid = scsgtbusurolid;
    }

    public Scsgtbusurol(Integer scsgtbusurolid, boolean habilitado, String fechainicio, boolean caducidad, int hinvestig, int hacademicas, Date fecharegistro) {
        this.scsgtbusurolid = scsgtbusurolid;
        this.habilitado = habilitado;
        this.fechainicio = fechainicio;
        this.caducidad = caducidad;
        this.hinvestig = hinvestig;
        this.hacademicas = hacademicas;
        this.fecharegistro = fecharegistro;
    }

    public Integer getScsgtbusurolid() {
        return scsgtbusurolid;
    }

    public void setScsgtbusurolid(Integer scsgtbusurolid) {
        this.scsgtbusurolid = scsgtbusurolid;
    }

    public boolean getHabilitado() {
        return habilitado;
    }

    public void setHabilitado(boolean habilitado) {
        this.habilitado = habilitado;
    }

    public String getFechainicio() {
        return fechainicio;
    }

    public void setFechainicio(String fechainicio) {
        this.fechainicio = fechainicio;
    }

    public boolean getCaducidad() {
        return caducidad;
    }

    public void setCaducidad(boolean caducidad) {
        this.caducidad = caducidad;
    }

    public Date getFechafin() {
        return fechafin;
    }

    public void setFechafin(Date fechafin) {
        this.fechafin = fechafin;
    }

    public int getHinvestig() {
        return hinvestig;
    }

    public void setHinvestig(int hinvestig) {
        this.hinvestig = hinvestig;
    }

    public int getHacademicas() {
        return hacademicas;
    }

    public void setHacademicas(int hacademicas) {
        this.hacademicas = hacademicas;
    }

    public Date getFecharegistro() {
        return fecharegistro;
    }

    public void setFecharegistro(Date fecharegistro) {
        this.fecharegistro = fecharegistro;
    }

    public String getObservaciones() {
        return observaciones;
    }

    public void setObservaciones(String observaciones) {
        this.observaciones = observaciones;
    }

    public Scthtbmodalida getScthtbmodalidaid() {
        return scthtbmodalidaid;
    }

    public void setScthtbmodalidaid(Scthtbmodalida scthtbmodalidaid) {
        this.scthtbmodalidaid = scthtbmodalidaid;
    }

    public Scthtbdatosgen getScthtbdatosgenid() {
        return scthtbdatosgenid;
    }

    public void setScthtbdatosgenid(Scthtbdatosgen scthtbdatosgenid) {
        this.scthtbdatosgenid = scthtbdatosgenid;
    }

    public Scsgtbroles getScsgtbrolesid() {
        return scsgtbrolesid;
    }

    public void setScsgtbrolesid(Scsgtbroles scsgtbrolesid) {
        this.scsgtbrolesid = scsgtbrolesid;
    }

    public Scittbfadece getScittbfadeceid() {
        return scittbfadeceid;
    }

    public void setScittbfadeceid(Scittbfadece scittbfadeceid) {
        this.scittbfadeceid = scittbfadeceid;
    }

    public Scittbescun getScittbescunid() {
        return scittbescunid;
    }

    public void setScittbescunid(Scittbescun scittbescunid) {
        this.scittbescunid = scittbescunid;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (scsgtbusurolid != null ? scsgtbusurolid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Scsgtbusurol)) {
            return false;
        }
        Scsgtbusurol other = (Scsgtbusurol) object;
        if ((this.scsgtbusurolid == null && other.scsgtbusurolid != null) || (this.scsgtbusurolid != null && !this.scsgtbusurolid.equals(other.scsgtbusurolid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entities.Scsgtbusurol[ scsgtbusurolid=" + scsgtbusurolid + " ]";
    }
    
}
